package com.example.mycarcalling.dao;

import com.example.mycarcalling.bean.Navigation;
import com.example.mycarcalling.vo.Address;
import com.example.mycarcalling.vo.OrderWithNav;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.List;

@Repository
@Mapper
public interface NavigationMapper {
    int deleteByPrimaryKey(Long navigationId);

    int insert(Navigation record);

    int insertSelective(Navigation record);

    Navigation selectByPrimaryKey(Long navigationId);

    int updateByPrimaryKeySelective(Navigation record);

    int updateByPrimaryKey(Navigation record);

    Navigation seletReadyOrStartNavigation(Long userId);

    List<Navigation> selectPassengerNavigationLimit3(@Param("address") Address address,@Param("passengerNumberPermit") Integer passengerNumberPermit);

    Navigation selectByNvIdAndZeroStatus(Long navigationId);

    List<OrderWithNav> selectOrderWithNavigation(Long driverId);

    List<OrderWithNav> selectOrderWithNavigationP(Long passengerId);
}